package com.haiya.observer.buildindemo;

public class Client {
    public static void main(String[] args) {
        Bull bull = new Bull();
        Bear bear = new Bear();
        OilFutures oilFutures = new OilFutures();

        oilFutures.addObserver(bull);
        oilFutures.addObserver(bear);

        System.out.println("油价上涨 +13~~~~~~~~~~~~~~");
        oilFutures.setPrice(13);
        System.out.println("油价下跌 9~~~~~~~~~~~~~~");
        oilFutures.setPrice(-9);
    }
}
